#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<iostream>
using namespace std;
void ave(struct stu*);
struct stu
{
	int mnum;
	char name[12];
	char sex;
	float score;
}boy[5] = { {101,"li ping",'M',45},
		 {102,"Zhang ping",'M',62.5},
		 {103,"He fang",'F',92.5},
		 { 104,"Cheng ling",'F',87 },
		 { 105,"Wang ming",'M',58 } };
int main()
{
	struct stu* ps;
	ps = boy;
	ave(ps);
	return (0);
}
void ave(struct stu* ps)
{
	int c = 0, i;
	float ave, s = 0;
	for (i = 0; i < 4; i++)
	{
		s += ps->score;
		if (ps->score < 60)
			c += 1;
	}
	cout << "s=" << s << endl;
	ave = s / 5;
	cout << "average=" << ave << endl;
	cout << "count=" << c << endl;
}